#ifndef __TERRAINPANEL_H__
#define __TERRAINPANEL_H__

#include "../workbasepanel.h"

class CTerrainPanel: public CWorkBasePanel{
public:
    static CTerrainPanel* GetInterface();
    CTerrainPanel( float fLeft, float fTop, float fWidth, float fHeight );
    virtual ~CTerrainPanel();
    virtual void Init();
    virtual void Final();
    virtual int32 Update( int32 nDelta, float fDelta );
    virtual int32 Render();
    virtual void Enter();
    virtual void Leave();
    void OnNotification_NewGame_Event( int32 w, int32 l, void* pData );
    int32 GetSelectTerrainBrushType();
    int32 GetSelectTerrainBrushSize();
    int32 GetSelectTerrainBrushAlpha();
    color32 GetSelectTerrainBrushColor();
    const char* GetSelectTerrainTextureFile();

private:
    virtual void OnClick( CUIElement *pSelf );
    virtual void OnSelected( CUIElement* pSelf, int32 nType, int32 nIndex );
    void SetTerrainEditMode( int32 nMode );
    void SetTerrainTexture( const char* strFileName );
    void SetTerrainSurfaceMode();
    void SetTerrainColorMode();
    void SetTerrainHeightMode( int32 nMode );
    void SetBrushSizeMode( int32 nMode );
    void SetBrushShapeMode( int32 nMode );
    char m_strGameSpace[32];

    CButton* m_pTerrainTextureEditEnableBtn;
    CButton* m_pTerrainColorEditEnableBtn;
    CButton* m_pTerrainHeightEditEnableBtn;

    CLable* m_pTerrainTextureTypeLB;
    CLable* m_pColorEditTypeLB;
    CLable* m_pTerrainHeightTypeLB;
    CLable* m_pBrushSizeLB;
    CLable* m_pBrushShapeLB;

    CIconButton* m_pTerrainTextureBtn;
    char m_strTerrainTextureFileName[32];


    //int32 m_nCurrentEditLayerIndex;
    CButton* m_pLayerIndexNameBtn;
    CLable* m_pLayerTextureName;
    CButton* m_vBlockUVScaleBtn;
    int32 m_vBlockScaleValue[7];

    CSlider* m_pSurfaceAlphaSlider;
    CButton* m_pSurfaceColor;



    CIconButton* m_vTerrainHeightTypeList[ 5 ];
    int32 m_nSelectTerrainHeightType;

    CIconButton* m_vBrushSizeList[ 5 ];
    int32 m_nSelectBrushSize;

    CIconButton* m_vBrushShapeList[ 2 ];
    int32 m_nSelectBrushShapeType;
};

#endif
